//
//  HELDataCommonCell.m
//  sanda
//
//  Created by wsj2015 on 16/7/11.
//  Copyright © 2016年 陈武琦. All rights reserved.
//

#import "HELDataCommonCell.h"
//#import "UIImageView+WebCache.h"
#import "UIImageView+UIActivityIndicatorForSDWebImage.h"

@implementation HELDataCommonCell

- (void)awakeFromNib {
    // Initialization code
    [super awakeFromNib];
    
    self.icon.layer.borderColor = kBorderColor.CGColor;
    self.icon.layer.borderWidth = 1;
    self.starView.userInteractionEnabled = NO;
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)setModle:(HELSearchResultsModel *)modle{
    
    //"attachUrl": "20160526152414_70164695-113d-4634-acbb-2fd99ebed9d4_0.png",
    //"attachUrlShow": "http://exam.hulijia365.com:80/scmcstudy/upload/sdimg/20160526152414_70164695-113d-4634-acbb-2fd99ebed9d4_0.png",
    //"attachUrlShowMap": {
    //    "mid": "http://exam.hulijia365.com:80/scmcstudy/upload/sdimg/20160526152414_70164695-113d-4634-acbb-2fd99ebed9d4_0_500.png",
    //    "mini": "http://exam.hulijia365.com:80/scmcstudy/upload/sdimg/20160526152414_70164695-113d-4634-acbb-2fd99ebed9d4_0_200.png",
    //    "src": "http://exam.hulijia365.com:80/scmcstudy/upload/sdimg/20160526152414_70164695-113d-4634-acbb-2fd99ebed9d4_0.png"
    //},
    //"commentNum": "0",
    //"createTime": 1464247471000,
    //"createTimeShow": "2016-05-26 15:24:31",
    //"departmentName": "医务部",
    //"id": "76",
    //"name": "儿童常见死因诊断和分类原则",
    //"size": "534607",
    //"sizeShow": "522 KB",
    //"studyDataStatus": "1",
    //"topTime": 1464247471000,
    //"topTimeShow": "2016-05-26 15:24:31",
    //"viewNum": "410"
    [self.icon setImageWithURL:[NSURL URLWithString:modle.attachUrlShow] placeholderImage:[UIImage imageNamed:@"暂无图片.jpg"] usingActivityIndicatorStyle:0];
    self.titleL.text = modle.name;
    if (modle.viewNum) {
         self.scanLabel.text = [NSString stringWithFormat:@"%@",modle.viewNum];
    }else{
          self.scanLabel.text = @"0";
    }
   
    self.commentL.text = [NSString stringWithFormat:@"%@",modle.commentNum];
    
   
}
@end
